<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>搭建环境 | lhx个人博客</title><meta name="keywords" content="前端基础CSS、Js、Vue、React、移动端、小程序、网络"><meta name="author" content="李汉鑫"><meta name="copyright" content="李汉鑫"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="自定义Vue开发环境1. 搭建基本开发环境1). 下载依赖包     yarn add -D webpack webpack-cli     yarn add -D html-webpack-plugin     yarn add -D webpack-dev-server     yarn add -D babel-loader @babel&#x2F;core @babel&#x2F;preset-env">
<meta property="og:type" content="article">
<meta property="og:title" content="搭建环境">
<meta property="og:url" content="http://example.com/Vue/%E7%AE%80%E4%BB%8B/index.html">
<meta property="og:site_name" content="lhx个人博客">
<meta property="og:description" content="自定义Vue开发环境1. 搭建基本开发环境1). 下载依赖包     yarn add -D webpack webpack-cli     yarn add -D html-webpack-plugin     yarn add -D webpack-dev-server     yarn add -D babel-loader @babel&#x2F;core @babel&#x2F;preset-env">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/img/default.jpg">
<meta property="article:published_time" content="2018-02-21T11:27:39.000Z">
<meta property="article:modified_time" content="2021-09-01T02:22:38.029Z">
<meta property="article:author" content="李汉鑫">
<meta property="article:tag" content="前端基础CSS、Js、Vue、React、移动端、小程序、网络">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/img/default.jpg"><link rel="shortcut icon" href="https://img2.baidu.com/it/u=1328275982,1207856622&fm=26&fmt=auto&gp=0.jpg"><link rel="canonical" href="http://example.com/Vue/%E7%AE%80%E4%BB%8B/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: undefined,
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    jQuery: 'https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js',
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
    },
    fancybox: {
      js: 'https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.umd.js',
      css: 'https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isanchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: '搭建环境',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2021-09-01 10:22:38'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if (GLOBAL_CONFIG_SITE.isHome && /iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><meta name="generator" content="Hexo 5.4.0"><link rel="alternate" href="/atom.xml" title="lhx个人博客" type="application/atom+xml">
</head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">加载中...</div></div></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://img2.baidu.com/it/u=203845187,735199026&amp;fm=26&amp;fmt=auto&amp;gp=0.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data is-center"><div class="data-item"><a href="/archives/"><div class="headline">文章</div><div class="length-num">31</div></a></div><div class="data-item"><a href="/tags/"><div class="headline">标签</div><div class="length-num">0</div></a></div><div class="data-item"><a href="/categories/"><div class="headline">分类</div><div class="length-num">10</div></a></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 文章</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/img/default.jpg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">lhx个人博客</a></span><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 文章</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">搭建环境</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="fa-fw post-meta-icon far fa-calendar-alt"></i><span class="post-meta-label">发表于</span><time datetime="2018-02-21T11:27:39.000Z" title="发表于 2018-02-21 19:27:39">2018-02-21</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/Vue/">Vue</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="搭建环境"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h1 id="自定义Vue开发环境"><a href="#自定义Vue开发环境" class="headerlink" title="自定义Vue开发环境"></a>自定义Vue开发环境</h1><h2 id="1-搭建基本开发环境"><a href="#1-搭建基本开发环境" class="headerlink" title="1. 搭建基本开发环境"></a>1. 搭建基本开发环境</h2><pre><code>1). 下载依赖包
    yarn add -D webpack webpack-cli
    yarn add -D html-webpack-plugin
    yarn add -D webpack-dev-server
    yarn add -D babel-loader @babel/core @babel/preset-env
    yarn add -D css-loader style-loader
    yarn add -D url-loader@2.3.0 file-loader@4.3.0

2). webpack的基本配置: webpack.config.js
    module.exports = &#123;
      mode: &#39;production|development&#39;
      entry: &#123;

      &#125;,
      output: &#123;

      &#125;,
      module: &#123;
        rules: [
            
        ]
      &#125;,
      plugins: [

      ],
      devServer: &#123;

      &#125;,
      devtool: &#39;&#39;
    &#125;

3). 区分使用生产环境与开发环境
    使用生产环境:
        npm run build   ==&gt; webpack
        1). 在内存中进行编译打包, 生成内存中的打包文件
        2). 保存到本地(在本地生成打包文件)   ===&gt; 此时还不能通过浏览器来访问, 需要启动服务器运行
    使用开发环境
        npm run dev   ==&gt; webpack-dev-server
        1). 在内存中进行编译打包, 生成内存中的打包文件
        2). 启动服务器, 运行内存中的打包文件(不生成本地打包文件)   ===&gt; 可以通过浏览器虚拟路径访问
</code></pre>
<h2 id="2-搭建Vue的开发环境"><a href="#2-搭建Vue的开发环境" class="headerlink" title="2. 搭建Vue的开发环境"></a>2. 搭建Vue的开发环境</h2><pre><code>1). 配置处理.Vue组件文件的loader和plugin
2). 配置使用vue-style-loader替换style-loader
3). 解决无法编译vue模板的错误
    原因: 默认引入的vue是不带编译器的版本, 无法对template配置指定模板进行编译
    解决: 配置模块别名来指定引入vue带编译器的版本
4). 配置省略模块后缀名(.js/.vue/.json)
</code></pre>
<h1 id="组件化"><a href="#组件化" class="headerlink" title="组件化"></a>组件化</h1><h2 id="1-vue单文件组件"><a href="#1-vue单文件组件" class="headerlink" title="1. vue单文件组件"></a>1. vue单文件组件</h2><pre><code>&lt;template&gt;
  &lt;div&gt;xxx&lt;/div&gt;
&lt;/template&gt;
&lt;script&gt;
  export default &#123;
    props: []/&#123;&#125;
    data()&#123;&#125;,
    computed: &#123;&#125;
    methods: &#123;&#125;,
    watch: &#123;&#125;
    filters: &#123;&#125;
    directives: &#123;&#125;
    components: &#123;&#125;
  &#125;
&lt;/script&gt;
&lt;style scoped&gt;
&lt;/style&gt;
</code></pre>
<h2 id="2-组件化编码的"><a href="#2-组件化编码的" class="headerlink" title="2. 组件化编码的"></a>2. 组件化编码的</h2><pre><code>基本流程
    1). 拆分界面, 抽取组件
    2). 编写静态组件
    3). 编写动态组件
        初始化数据, 动态显示初始化界面
        实现与用户交互功能

设计data
    类型: [&#123;id: 1, title: &#39;xxx&#39;, completed: false&#125;]
    名称: todos
    位置: 如果只是哪个组件用, 交给它, 如果是哪些组件用, 交给共同的父组件

关于状态数据的更新
    data数据定义在哪个组件, 更新数据的行为就定义在哪个组件
    如果子组件要更新父组件的数据, 调用父组件的更新函数来更新父组件的数据
    一个组件接收属性数据不要直接修改, 只是用来读取显示的

相关问题:
    组件的data配置为什么只能是函数, 不能是对象?
        保证同一个组件的多个实例对象的data对象不是共用的, 而是各自自己的data对象
    组件对象与Vue是什么关系?
        所有组件对象的原型对象都是一个vm对象
        所有组件对象都能看到定义在Vue原型对象上的属性或方法
</code></pre>
<h2 id="3-组件间通信"><a href="#3-组件间通信" class="headerlink" title="3. 组件间通信"></a>3. 组件间通信</h2><pre><code>1). 组件通信的5种方式
    props
    vue的自定义事件
    全局事件总线
    slot
    vuex(后面单独讲)

2). props:
    父子组件间通信的基本方式
    属性值的2大类型:
        一般/非函数: 父组件--&gt;子组件
        函数: 子组件--&gt;父组件
    问题: 
        隔层组件间传递: 必须逐层传递(麻烦)
        兄弟组件间: 必须借助父组件(麻烦)

2). vue自定义事件
    给子组件标签绑定事件监听
    子组件向父组件的通信方式
    功能类似于function props
    问题: 不适合隔层组件和兄弟组件间的通信

3). 全局事件总线
    利用vm对象的$on()/$emit()/$off()
    利用组件对象的原型对象是vm对象, 组件对象能直接看到Vue原型对象上的属性
    创建vm对象作为全局事件总线对象保存到Vue的原型对象上, 所有的组件对象都可以直接可见:
        Vue.prototype.$bus = new Vue()   // 也可以直接利用最外层的vm对象
        任意组件A可以通过this.$bus.$on()绑定监听接收数据
        任意组件B可以通过this.$bus.$emit()分发事件, 传递数据

4). slot
    父组件向子组件通信
    通信是带数据的标签
    注意: 标签是在父组件中解析

5). vuex
    多组件共享状态(数据的管理)
    组件间的关系也没有限制
    功能比事件总线强大, 更适用于vue项目
</code></pre>
<h2 id="4-自定义消息订阅与发布"><a href="#4-自定义消息订阅与发布" class="headerlink" title="4. 自定义消息订阅与发布"></a>4. 自定义消息订阅与发布</h2><pre><code>1). 相关语法
    a. PubSub: 包含所有功能的订阅/发布消息的管理者对象
    b. token PubSub.subscribe(msg, subscriber): 订阅消息: 指定消息名和订阅者回调函数
    c. PubSub.publish(msg, data): 异步发布消息: 指定消息名和数据
    d. PubSub.publishSync(msg, data): 同步发布消息: 指定消息名和数据
    e. PubSub.unsubscribe(flag): 取消订阅: 根据标识取消某个或某些消息的订阅
2). 内部容器结构
    &#123;
        &quot;add&quot;: &#123;
            uid_1: callback1,
            uid_2: callback2
        &#125;,
        &quot;delete&quot;: &#123;
            uid_3: callback3
        &#125;
    &#125;
</code></pre>
<h2 id="5-自定义事件总线"><a href="#5-自定义事件总线" class="headerlink" title="5. 自定义事件总线"></a>5. 自定义事件总线</h2><pre><code>1). 相关语法
    a. EventBus: 包含所有功能的全局事件总线对象
    b. EventBus.on(eventName, listener): 绑定事件监听
    c. EventBus.emit(eventName, data): 分发事件
    d. EventBus.off(eventName): 解绑事件监听
2). 内部容器结构
    &#123;
        &quot;add&quot;: [callback1, callback2],
        &quot;delete&quot;: [callback3]
    &#125;
</code></pre>
<h2 id="6-与后台进行通信"><a href="#6-与后台进行通信" class="headerlink" title="6. 与后台进行通信"></a>6. 与后台进行通信</h2><pre><code>1). 使用什么发ajax请求?
    vue-resource   vue1.x使用
    axios vue2.x使用
2). 在什么时候发请求?
    mounted()中
    事件监听回调函数或相关函数中
</code></pre>
<h2 id="7-vue-UI组件库"><a href="#7-vue-UI组件库" class="headerlink" title="7. vue UI组件库"></a>7. vue UI组件库</h2><pre><code>常用的UI组件库
    PC: Element / iview /
    Mobile: mint-ui / vant-ui / cube-ui
mint-ui的使用
    根据官方文档使用
    配置实现按需引入打包
</code></pre>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="mailto:undefined">李汉鑫</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="http://example.com/Vue/%E7%AE%80%E4%BB%8B/">http://example.com/Vue/%E7%AE%80%E4%BB%8B/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="http://example.com" target="_blank">lhx个人博客</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"></div><div class="post_share"><div class="social-share" data-image="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/img/default.jpg" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/social-share.js/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/Vue/%E9%A1%B9%E7%9B%AE%E4%BC%98%E5%8C%96/"><img class="prev-cover" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/img/default.jpg" onerror="onerror=null;src='/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">项目优化</div></div></a></div><div class="next-post pull-right"><a href="/Vue/%E7%BB%84%E4%BB%B6%E5%8C%96/"><img class="next-cover" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/img/default.jpg" onerror="onerror=null;src='/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">组件化</div></div></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="https://img2.baidu.com/it/u=203845187,735199026&amp;fm=26&amp;fmt=auto&amp;gp=0.jpg" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">李汉鑫</div><div class="author-info__description">前端基础CSS、Js、Vue、React、移动端、小程序、网络</div></div><div class="card-info-data is-center"><div class="card-info-data-item"><a href="/archives/"><div class="headline">文章</div><div class="length-num">31</div></a></div><div class="card-info-data-item"><a href="/tags/"><div class="headline">标签</div><div class="length-num">0</div></a></div><div class="card-info-data-item"><a href="/categories/"><div class="headline">分类</div><div class="length-num">10</div></a></div></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div><div class="announcement_content">个人网站,欢迎交流</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#%E8%87%AA%E5%AE%9A%E4%B9%89Vue%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83"><span class="toc-number">1.</span> <span class="toc-text">自定义Vue开发环境</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#1-%E6%90%AD%E5%BB%BA%E5%9F%BA%E6%9C%AC%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83"><span class="toc-number">1.1.</span> <span class="toc-text">1. 搭建基本开发环境</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#2-%E6%90%AD%E5%BB%BAVue%E7%9A%84%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83"><span class="toc-number">1.2.</span> <span class="toc-text">2. 搭建Vue的开发环境</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E7%BB%84%E4%BB%B6%E5%8C%96"><span class="toc-number">2.</span> <span class="toc-text">组件化</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#1-vue%E5%8D%95%E6%96%87%E4%BB%B6%E7%BB%84%E4%BB%B6"><span class="toc-number">2.1.</span> <span class="toc-text">1. vue单文件组件</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#2-%E7%BB%84%E4%BB%B6%E5%8C%96%E7%BC%96%E7%A0%81%E7%9A%84"><span class="toc-number">2.2.</span> <span class="toc-text">2. 组件化编码的</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#3-%E7%BB%84%E4%BB%B6%E9%97%B4%E9%80%9A%E4%BF%A1"><span class="toc-number">2.3.</span> <span class="toc-text">3. 组件间通信</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#4-%E8%87%AA%E5%AE%9A%E4%B9%89%E6%B6%88%E6%81%AF%E8%AE%A2%E9%98%85%E4%B8%8E%E5%8F%91%E5%B8%83"><span class="toc-number">2.4.</span> <span class="toc-text">4. 自定义消息订阅与发布</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#5-%E8%87%AA%E5%AE%9A%E4%B9%89%E4%BA%8B%E4%BB%B6%E6%80%BB%E7%BA%BF"><span class="toc-number">2.5.</span> <span class="toc-text">5. 自定义事件总线</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#6-%E4%B8%8E%E5%90%8E%E5%8F%B0%E8%BF%9B%E8%A1%8C%E9%80%9A%E4%BF%A1"><span class="toc-number">2.6.</span> <span class="toc-text">6. 与后台进行通信</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#7-vue-UI%E7%BB%84%E4%BB%B6%E5%BA%93"><span class="toc-number">2.7.</span> <span class="toc-text">7. vue UI组件库</span></a></li></ol></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/%E7%A7%BB%E5%8A%A8%E7%AB%AF/%E7%A7%BB%E5%8A%A8%E7%AB%AF/" title="移动端"><img src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/img/default.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="移动端"/></a><div class="content"><a class="title" href="/%E7%A7%BB%E5%8A%A8%E7%AB%AF/%E7%A7%BB%E5%8A%A8%E7%AB%AF/" title="移动端">移动端</a><time datetime="2021-06-07T09:21:39.000Z" title="发表于 2021-06-07 17:21:39">2021-06-07</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%B0%8F%E7%A8%8B%E5%BA%8F/" title="小程序基础"><img src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/img/default.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="小程序基础"/></a><div class="content"><a class="title" href="/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%B0%8F%E7%A8%8B%E5%BA%8F/" title="小程序基础">小程序基础</a><time datetime="2021-05-03T05:20:10.000Z" title="发表于 2021-05-03 13:20:10">2021-05-03</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/%E7%BD%91%E7%BB%9C/http%E5%8D%8F%E8%AE%AE%E4%B8%89%E6%AC%A1%E6%8F%A1%E6%89%8B%E5%92%8C%E5%9B%9B%E6%AC%A1%E6%8C%A5%E6%89%8B/" title="http协议三次握手和四次挥手"><img src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/img/default.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="http协议三次握手和四次挥手"/></a><div class="content"><a class="title" href="/%E7%BD%91%E7%BB%9C/http%E5%8D%8F%E8%AE%AE%E4%B8%89%E6%AC%A1%E6%8F%A1%E6%89%8B%E5%92%8C%E5%9B%9B%E6%AC%A1%E6%8C%A5%E6%89%8B/" title="http协议三次握手和四次挥手">http协议三次握手和四次挥手</a><time datetime="2020-10-25T13:40:49.000Z" title="发表于 2020-10-25 21:40:49">2020-10-25</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/%E7%BD%91%E7%BB%9C/%E5%9C%A8%E6%B5%8F%E8%A7%88%E5%99%A8%E5%9C%B0%E5%9D%80%E6%A0%8F%E8%BE%93%E5%85%A5url%E7%84%B6%E5%90%8E%E6%95%B2%E5%87%BB%E5%9B%9E%E8%BD%A6%E4%B9%8B%E5%90%8E%E9%83%BD%E5%81%9A%E4%BA%86%E4%BB%80%E4%B9%88/" title="在浏览器地址栏输入url然后敲击回车之后都做了什么"><img src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/img/default.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="在浏览器地址栏输入url然后敲击回车之后都做了什么"/></a><div class="content"><a class="title" href="/%E7%BD%91%E7%BB%9C/%E5%9C%A8%E6%B5%8F%E8%A7%88%E5%99%A8%E5%9C%B0%E5%9D%80%E6%A0%8F%E8%BE%93%E5%85%A5url%E7%84%B6%E5%90%8E%E6%95%B2%E5%87%BB%E5%9B%9E%E8%BD%A6%E4%B9%8B%E5%90%8E%E9%83%BD%E5%81%9A%E4%BA%86%E4%BB%80%E4%B9%88/" title="在浏览器地址栏输入url然后敲击回车之后都做了什么">在浏览器地址栏输入url然后敲击回车之后都做了什么</a><time datetime="2020-10-24T14:10:19.000Z" title="发表于 2020-10-24 22:10:19">2020-10-24</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/%E7%BD%91%E7%BB%9C/%E8%AF%B7%E6%B1%82%E5%93%8D%E5%BA%94%E6%8A%A5%E6%96%87/" title="请求响应报文"><img src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/img/default.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="请求响应报文"/></a><div class="content"><a class="title" href="/%E7%BD%91%E7%BB%9C/%E8%AF%B7%E6%B1%82%E5%93%8D%E5%BA%94%E6%8A%A5%E6%96%87/" title="请求响应报文">请求响应报文</a><time datetime="2020-10-24T12:21:39.000Z" title="发表于 2020-10-24 20:21:39">2020-10-24</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2021 By 李汉鑫</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script>var preloader = {
  endLoading: () => {
    document.body.style.overflow = 'auto';
    document.getElementById('loading-box').classList.add("loaded")
  },
  initLoading: () => {
    document.body.style.overflow = '';
    document.getElementById('loading-box').classList.remove("loaded")

  }
}
window.addEventListener('load',preloader.endLoading())</script><div class="js-pjax"></div><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>